﻿#ifndef MEASUREARC3P_H
#define MEASUREARC3P_H

#include "MeasureElement.h"
namespace Qly {

class MeasureDataSet;

/**
 * @brief The MeasureArc3P class 圆弧测量
 *                       m_results_um[0] 存放的是圆弧的圆心X 坐标
 *                       m_results_um[1] 存放的是圆弧的圆心Y 坐标
 *                       m_results_um[2] 存放的是圆弧的半径
 *                       m_results_um[3] 存放的是圆弧的直径
 *                       m_results_um[4] 存放的是圆弧的起点的角度
 *                       m_results_um[5] 存放的是圆弧的夹角
 *                       textTemplate 支持 @diameter_um, @diameter_mm, @diameter,
 *                                        @radius_um, @radius_mm, @radius, @arcLength, @unit
 *                                        @angleDeg, @angle 10 个关键字
 */
class MeasureArc3P: public MeasureElement
{
    friend MeasureDataSet;
public:
    MeasureArc3P(MeasureDataSet * parent = nullptr);
    QString name() Q_DECL_OVERRIDE {return u8"圆弧测量";}
private:

    int mouseLButtonPress(QPointF point_pix, QPointF point_um) Q_DECL_OVERRIDE;
    int mouseMove(QPointF point_pix, QPointF point_um) Q_DECL_OVERRIDE;

    void compute(void) Q_DECL_OVERRIDE; //计算图元的位置，还有长度结果
    void updateText(bool updatePosition = true) Q_DECL_OVERRIDE;
    void paint( QPainter &painter ) Q_DECL_OVERRIDE; //画方法
};

}
#endif // MEASUREARC3P_H
